import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login.vue')
  },

  {
    path: '/',
    name: 'select-room',
    component: () => import('../views/select-room.vue')
  },

  // 随机 排序
  {
    path: '/random-name',
    name: 'RandomName',
    component: () => import('../views/random-name.vue')
  },

  // 选手 排名
  {
    path: '/person-sort/:contestId/:contestName',
    name: 'PersonSort',
    component: () => import('../views/personSort.vue')
  },

  // 最终 排名 
  {
    path: '/final-ranking',
    name: 'FinalRanking',
    component: () => import('../views/final-ranking.vue')
  }
]

const router = new VueRouter({
  // mode: 'hash',
  routes
})

export default router
